home *** CD-ROM | disk | FTP | other *** search
-
-
- SETVAR -- Copyright (C) 1984 by Darryl E. Rubin
-
- This program reads the standard input and assigns that value
- to the environment variable named on the command line.
-
- o If the named variable does not exist, it is created.
-
- o If it does exist, it is deleted and recreated with the
- new value
-
- o The variable is not entered into the environment if
- there isn't enough room for it and its value.
-
- Example: echo test| setvar VAR ; same as SET VAR=test
-
- On return to command.com, SETVAR sets the errorlevel equal
- to the length of the string assigned to the variable
- ( 0 if the variable could not be created or assigned ). In
- the above example, SETVAR returns an errorlevel of 4.
-
- Note that SETVAR does not fold its command line argument
- to upper case, so be careful! Saying SETVAR test creates
- a different variable than "SETVAR TEST". The former
- creates a variable "test" that cannot be accessed via the
- DOS "SET" command ( SET folds its arguments to upper case ).
-
- This can be particularly useful in batch files for multiple
- responses and tests. i.e. this helps batch become a true
- language.
-
- The program was downloaded from the COMPUTER LANGUAGE
- bulletin board in California.(MLM)